package com.alibaba.citrus.cr.mn.order.center.facade.function.common;

import com.alibaba.citrus.cr.common.enums.ordercenter.InnerMessageEventEnum;
import com.epoch.app.crb2btradecenter.sdo.OrderSDO;
import com.epoch.app.mnordercenter.model.dto.CommonAsyncMessageResponse;

import java.util.List;
import java.util.Map;

/**
 * @author zhangxiaorui
 * @ClassName SendMsgService
 * @description: 发送消息服务
 * @date 2023/04/21 19:22
 * @version: 1.0
 */
public interface SendMsgService {

    /**
     * 生成销售单对象<主单ID, List<子单ID>>
     */
    void startTaskAndSendSalesOrderMessage(Map<String, List<String>> confirmOrderMap);

    /**
     * 发送库存占用消息
     */
    void sendMsgToInventoryOccupy(List<OrderSDO> orderSubmitList);

    /**
     * 发送库存释放消息
     */
    void sendMsgToInventoryRelease(List<OrderSDO> orderList);

    /**
     * 发消息到sap
     */
    void sendMsgToSAP(String msg);

    /**
     * 发送mq消息，异步发送kafka消息通知应用
     */
    void sendMsgToSendKafka(CommonAsyncMessageResponse message);

    /**
     * 发消息到kafka
     */
    void sendMsgToKafka(String topic, String message);

    /**
     * 发送订单变更消息
     */
    void sendSalesOrderChangeMsg(List<String> salesOrderNos, InnerMessageEventEnum event);

    void sendSalesOrderChangeMsg(Map<String, List<String>> salesOrderNosMap, InnerMessageEventEnum event);

    /**
     * 发送预报订单变更消息
     */
    void sendForecastOrderChangeMsg(List<String> forecastOrderNoList, InnerMessageEventEnum event);

    void sendForecastClosedMsgToSAP(String message);

    /**
     * 发送换货单入库完成消息
     */
    void sendExSaleOrderInComplete(OrderSDO orderSDO);

    /**
     * 发送消息触发调用sap拒绝接口
     */
    void sendSalesOrderRefuseMsg(String message);

    /**
     * 发送组装活动失败消息
     */
    void sendActivityFailMsg(String sequenceNo, List<Long> forecastLineIds);

    /**
     *发送履约单创建、关闭同步确认数量消息
     */
    void sendConfirmQuantityMsg(String message);
}
